//
//  WBTextfield.swift
//  weibobo
//
//  Created by KIMI on 16/9/20.
//  Copyright © 2016年 KIMI. All rights reserved.
//

import UIKit
//实时看到xib设置效果
@IBDesignable

class WBTextfield: UITextField {

    //设置边框颜色
    @IBInspectable var borderColor: UIColor?{
        
        didSet{
            
            self.layer.borderColor = borderColor?.cgColor
        }
    }
    
    //设置边框宽度
    @IBInspectable var borderWidth: CGFloat = 0{
        
        didSet{
            self.layer.borderWidth = borderWidth
        }
    }
    //设置角度
    @IBInspectable var cornerRadius: CGFloat = 0{
        
        didSet{
            
            self.layer.cornerRadius = cornerRadius
            self.layer.masksToBounds = true
        }
    }

}
